
(function () { 
	Lhs.ui.CreateCommunicateWindow = function () {
	var pathimage=Ti.App.Properties.getString('pathimage');
    var win = Titanium.UI.createWindow({
        id: 'Communicate',
        title: 'TRUYỀN THÔNG',
        fullscreen: true,
        backgroundImage:pathimage+'bg.png',
        navBarHidden:true,
    });
    
    var egc = new globals.EventGarbageCollection(win);
    egc.addEventListener('back_'+win.id, function () {
    	Lhs.navGroup.close(win, {
             animated: true
        });
    	
	});
	
	//HEADER ON WINDOWS
    var main_header=require('controls/header').Createheader({
	  	idWinParent:win.id,
	  	height:Ti.App.Properties.getInt('height_Header'),//44,
	  	title:'TRUYỀN THÔNG',
    })
	win.add(main_header);
    //Panel
    var platformWidth=Titanium.Platform.displayCaps.platformWidth;
    var	platformHeight=Titanium.Platform.displayCaps.platformHeight;
  	var height_panel=(platformHeight-main_header.height)/4
  	Ti.API.info(height_panel+':'+platformHeight+':'+main_header.height)
    var panel1=require('controls/panel').panel({
		width:platformWidth,
		height:height_panel,
		top:main_header.height,
		left:0,
		backgroundColor:'Red',
		backgroundImage:pathimage+'Comunicate1.png',
		backgroundSelectedImage:pathimage+'Comunicate1_done.png',
		title:'TH Analog',
		even:'even:analog',
		backgroundImage_View:pathimage+'ic_btn_home_page_defualt.9.png',
		backgroundSelectedImage_View:pathimage+'ic_btn_clover_one_pressed.9.png',
    })
    win.add(panel1);
    
  
    var panel2=require('controls/panel').panel({
		width:platformWidth,
		height:height_panel,
		top:panel1.top+panel1.height,
		left:0,
		backgroundColor:'#bbbbbb',
		backgroundImage:pathimage+'Comunicate2.png',
		backgroundSelectedImage:pathimage+'Comunicate2_done.png',
		title:'TH Cáp số',
		even:'even:cab',
		backgroundImage_View:pathimage+'ic_btn_clover_two_default.9.png',
		backgroundSelectedImage_View:pathimage+'ic_btn_clover_two_pressed.9.png',
    })
    win.add(panel2);
    
    var panel3=require('controls/panel').panel({
		width:platformWidth,
		height:height_panel,
		top:panel2.top+panel2.height,//panel1.height+main_header.height,
		left:0,
		backgroundColor:'Yellow',
		backgroundImage:pathimage+'Comunicate3.png',
		backgroundSelectedImage:pathimage+'Comunicate3_done.png',
		title:'Báo chí',
		even:'even:new',
		backgroundImage_View:pathimage+'ic_btn_clover_three_default.9.png',
		backgroundSelectedImage_View:pathimage+'ic_btn_clover_three_pressed.9.png',
    })
    win.add(panel3);
    
    
    var panel4=require('controls/panel').panel({
		width:platformWidth,
		height:height_panel,
		top:panel3.top+panel3.height,//panel1.height+main_header.height,
		left:0,
		backgroundColor:'Pink',
		backgroundImage:pathimage+'Comunicate4.png',
		backgroundSelectedImage:pathimage+'Comunicate4_done.png',
		title:'Radio',
		even:'even:radio',
		backgroundImage_View:pathimage+'ic_btn_clover_four_default.9.png',
		backgroundSelectedImage_View:pathimage+'ic_btn_clover_four_pressed.9.png',
    })
   win.add(panel4);
    
    
    
    
    
    
 	return win;
       
    };
})();